<?php
$f3 = require('fatfree/base.php');
$f3->config('app/config.ini');


$f3->route('GET /',
    function($f3) {
        include "dbconnect.php";
        include "view/indexView.php";
    }
);

$f3->route('GET /continent/@continentId',
    function($f3) {
        include "dbconnect.php";
        include "view/continentView.php";
    }
);

$f3->route('GET /continent/continentInformation/@continentId',
    function($f3) {
        include "dbconnect.php";
        include "view/continentInfo.php";
    }
);

$f3->route('GET /continent/countryCount/@continentId',
    function($f3) {
        include "dbconnect.php";
        include "view/continentCountView.php";
    }
);

$f3->route('GET /country/@countryId',
    function($f3) {
        include "dbconnect.php";
        include "view/countryView.php";
    }
);

$f3->route('GET /country/countryInformation/@countryId',
    function($f3) {
        include "dbconnect.php";
        include "view/countryInfo.php";
    }
);

$f3->route('GET /city/@cityId',
    function($f3) {
        include "dbconnect.php";
        include "view/cityView.php";
    }
);

$f3->route('PUT /city/@cityId',
    function($f3) {
        include "dbconnect.php";
        include "view/cityInsert.php";
    }
);

$f3->route('DELETE /city/@cityId',
    function($f3) {
        include "dbconnect.php";
        include "view/cityDelete.php";
    }
);

$f3->route('POST /city/@cityId',
    function($f3) {
        include "dbconnect.php";
        include "view/cityUpdate.php";
    }
);

$f3->run();
?>